type archive_t = anyptr
type archive_entry_t = anyptr

#linkid archive_write_new
fn write_new():archive_t

#linkid archive_write_add_filter_gzip
fn write_add_filter_gzip(archive_t a)

#linkid archive_write_set_format_ustar
fn write_set_format_ustar(archive_t a)

#linkid archive_write_open_filename
fn write_open_filename(archive_t a, anyptr filename)

#linkid archive_read_disk_new
fn read_disk_new():archive_t

#linkid archive_read_disk_open
fn read_disk_open(archive_t a, anyptr filename):i32

#linkid archive_entry_new
fn entry_new():archive_entry_t

#linkid archive_read_next_header2
fn read_next_header2(archive_t a, archive_entry_t e):i32

#linkid archive_error_string
fn error_string(archive_t a):anyptr

#linkid archive_read_disk_descend
fn read_disk_descend(archive_t a):i32

#linkid archive_write_header
fn write_header(archive_t a, archive_entry_t entry):i32

#linkid archive_entry_pathname
fn entry_pathname(archive_entry_t entry):anyptr

#linkid archive_entry_set_pathname
fn entry_set_pathname(archive_entry_t entry, anyptr pathname)

#linkid archive_entry_sourcepath
fn entry_sourcepath(archive_entry_t entry):anyptr

#linkid archive_entry_free
fn entry_free(archive_entry_t entry)

#linkid archive_write_data
fn write_data(archive_t a, anyptr buf, int len):int

#linkid archive_read_close
fn read_close(archive_t a):i32

#linkid archive_read_free
fn read_free(archive_t a):i32

#linkid archive_write_close
fn write_close(archive_t a):i32

#linkid archive_write_free
fn write_free(archive_t a):i32

#linkid archive_read_new
fn read_new():archive_t

#linkid archive_write_disk_new
fn write_disk_new():archive_t

#linkid archive_write_disk_set_options
fn write_disk_set_options(archive_t ext, i32 flags):i32

#linkid archive_write_disk_set_standard_lookup
fn write_disk_set_standard_lookup(archive_t ext):i32

#linkid archive_read_support_format_all
fn read_support_format_all(archive_t a):i32

#linkid archive_read_support_filter_all
fn read_support_filter_all(archive_t a):i32

#linkid archive_read_support_filter_gzip
fn read_support_filter_gzip(archive_t a):i32

#linkid archive_read_support_format_tar
fn read_support_format_tar(archive_t a):i32

#linkid archive_read_open_filename
fn read_open_filename(archive_t a, anyptr filename, uint block_size):i32

#linkid archive_read_next_header
fn read_next_header(archive_t a, rawptr<archive_entry_t> entry_ptr):i32

#linkid archive_read_data_block
fn read_data_block(archive_t ar, rawptr<anyptr> buf, rawptr<uint> size, rawptr<i64> offset):i32

#linkid archive_write_data_block
fn write_data_block(archive_t aw, anyptr buf, uint size, i64 offset):i32